﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.VisualBasic;

namespace Job.Core.Common
{
    /// <summary>
    /// 常规性 String 操作扩展。
    /// </summary>
    public static class DecimalExtensions
    {
        #region
        public static string GetStr(this decimal? dec)
        {
            return GetStr(GetHelper.GetVal<decimal>(dec));
        }

        public static string GetStr(this decimal dec)
        {
            if (dec == null)
                dec = 0;

            return dec.ToString("f2");
        }
        #endregion
    }
}
